var __extends =
    (this && this.__extends) ||
    (function () {
      var e = function (t, n) {
        return (e =
          Object.setPrototypeOf ||
          ({ __proto__: [] } instanceof Array &&
            function (e, t) {
              e.__proto__ = t;
            }) ||
          function (e, t) {
            for (var n in t)
              Object.prototype.hasOwnProperty.call(t, n) && (e[n] = t[n]);
          })(t, n);
      };
      return function (t, n) {
        function o() {
          this.constructor = t;
        }
        if ("function" != typeof n && null !== n)
          throw new TypeError(
            "Class extends value " + String(n) + " is not a constructor or null"
          );
        e(t, n),
          (t.prototype =
            null === n
              ? Object.create(n)
              : ((o.prototype = n.prototype), new o()));
      };
    })(),
  MoneyAreaView = (function (e) {
    function t() {
      var t = e.call(this) || this;
      return (
        t.list_money_sancai.on(Laya.Event.CLICK, t, t.onMoneySanCaiAction),
        (t.list_money_sancai.selectEnable = !0),
        t.btn_moneyArea.on(Laya.Event.CLICK, t, t.onMoneyDidClick),
        t
      );
    }
    return (
      __extends(t, e),
      (t.showMoneyView = function (e, n) {
        return (
          null == this.moneyV && (this.moneyV = new t()),
          (this.moneyV.caller = e),
          (this.moneyV.method = n),
          (this.moneyV.moneyArea_bool = !1),
          (this.moneyV.list_money_sancai.visible = !1),
          this.moneyV.onDataWithList(),
          (this.moneyV.list_money_sancai.height = 0),
          this.moneyV
        );
      }),
      (t.prototype.onDataWithList = function () {
        var e = ["10W银", "500金", "1000金"];
        this.resultArr = [];
        for (var t, n = 0; n < e.length; n++)
          (t = { item_money_area: { label: e[n] } }), this.resultArr.push(t);
        this.list_money_sancai.dataSource = this.resultArr;
      }),
      (t.prototype.onMoneyDidClick = function () {
        1 == this.moneyArea_bool
          ? ((this.moneyArea_bool = !1),
            (this.list_money_sancai.visible = !1),
            (this.list_money_sancai.height = 0))
          : ((this.moneyArea_bool = !0),
            (this.list_money_sancai.visible = !0),
            (this.list_money_sancai.height = 115));
      }),
      (t.prototype.onMoneySanCaiAction = function (e) {
        this.method.call(this.caller, this),
          (this.moneyArea_bool = !1),
          (this.list_money_sancai.visible = !1);
        var t = 0;
        0 == this.list_money_sancai.selectedIndex
          ? ((t = 3), (this.btn_moneyArea.label = "10W银"))
          : 1 == this.list_money_sancai.selectedIndex
          ? ((t = 2), (this.btn_moneyArea.label = "500金"))
          : 2 == this.list_money_sancai.selectedIndex &&
            ((t = 1), (this.btn_moneyArea.label = "1000金")),
          Laya.stage.event("ChatRoomView", {
            name: "list_money_value",
            data: t,
          });
      }),
      (t.removeMoneyAreaView = function () {
        this.moneyV.removeSelf();
      }),
      t
    );
  })(ui.MessageController.MoneyAreaViewUI);
